<?php
/**
 # mod_megabannerslider - Mega Banner Slider Module for Joomla! 1.7
 # author 		OmegaTheme.com
 # copyright 	Copyright(C) 2011 - OmegaTheme.com. All Rights Reserved.
 # @license 	http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 # Website: 	http://omegatheme.com
 # Technical support: Forum - http://omegatheme.com/forum/
**/
/**------------------------------------------------------------------------
 * file: default.php 1.7.0 00001, March 2011 12:00:00Z OmegaTheme $
 * package:	Mega Banner Slider Module
 *------------------------------------------------------------------------*/
//No direct access!
defined('_JEXEC') or dies;
?>
<div class="megawrapscroller" style="width: <?php echo $sliderWidth.'px'; ?>">
	<div class="megascrollable" style="width:<?php echo $sliderWidth.'px';?>; height: <?php echo $sliderHeight.'px';?>">
	   <div class="items" style="width:<?php echo $sliderWidth.'px';?>; height: <?php echo $sliderHeight.'px';?>" >
		<?php foreach($images as $image) : ?>
			<div class="img" style="width:<?php echo $sliderWidth.'px';?>; height: <?php echo $sliderHeight.'px';?>" >
				<?php 
					$image->folder	= str_replace( '\\', '/', $image->folder );
					$img = JHTML::_('image', $image->folder.'/'.$image->name, $image->name, 'width='.'"'.intval($sliderWidth).'"');
					echo $img;
				?>
			</div>
		<?php endforeach;?>
	    </div>
	</div>
</div>
<script type="text/javascript" charset="utf-8">
<!--
	var j = jQuery.noConflict();
	j(function(){
		 var slideshow = j('.items')
		 .after('<div id="megaslidenav">')
		 .cycle({ 
		     fx:     'fade', 
		     speed:  '300', 
		     timeout: 4000,
		     pager:  '#megaslidenav' 
		 });
		 j('#megaslidenav').prepend('<span id="pauseButton" class="pause">&nbsp;</span>');
		 j('#pauseButton').click(function() {
		     var obj = j(this);
		     if (obj.hasClass('pause')) {
		         obj.removeClass('pause').addClass('play');
		         slideshow.cycle('pause'); 
		     } else if (obj.hasClass('play')) {
		         obj.removeClass('play').addClass('pause');
		         slideshow.cycle('resume');
		     }
		 });
		// add style
		j('#megaslidenav').css({
			'position': 'absolute',
			'top': <?php echo $sliderHeight-20; ?>
		});
	});
-->
</script>

